package com.admin.service;

import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * 阿里OSS
 */
public interface OssUtilsService {

    void upload(MultipartFile file, String name) throws IOException;

    void uploadNewVersion(MultipartFile file, String name) throws IOException;

    String getOssUrl();

    String getOssPathChild();

    /**
     * 获取签名后的url
     * @param objectName
     * @return
     */
    String getSignUrl(String objectName);


    /**
     * 获取防盗链信息
     * @return
     */
    List<String> getRefererList();

    /**
     * 删除防盗链
     * @return
     */
    Boolean delReferer();

    Boolean setReferer(List<String> list);

    /**
     * 处理url
     * @param url
     * @return
     */
    String getUpdateUrl(String url);



}
